#include <iostream>
const double MINS_PER_DEG = 60.0;
const double SECS_PER_MIN = 60.0;
int main()
{
    using namespace std;
    
    int degrees;
    int minutes;
    int seconds;
    double latitude;
    
    cout << "Enter a latitude in degrees, minutes, and seconds:\n";
    cout << "First, enter the degrees: ";
    cin >> degrees;
    cout << "Next, enter the minutes of arc: ";
    cin >> minutes;
    cout << "Finally, enter the seconds of arc: ";
    cin >> seconds;
    latitude = degrees + (minutes + seconds / SECS_PER_MIN)/MINS_PER_DEG;
    cout << degrees << " degrees, " << minutes << " minutes, "
         << seconds << " seconds = " << latitude << " degrees\n";
    return 0; 
}
